<template>
  <div class="all">
    <van-nav-bar
      fixed
      placeholder
      safe-area-inset-top
      title="问题答疑"
      @click-left="back"
      z-index="100000"
    >
    <template #left>
    <van-icon name="arrow-left" size="16px" color="#333"/>
  </template>
    </van-nav-bar>
    <div class="tipwords">/ / / / / ANSWER COMMON QUESTIONS \ \ \ \ \</div>
    <div class="content">
      <div class="imgpart">
        <img src="../../assets/awswerbg01.png" alt="" />
        <img class="centerimg" src="../../assets/awswerbg02.png" alt="" />
      </div>
      <div class="wordpart">
        <div class="tbox">
          <img src="../../assets/qaask.png" alt="" /><span>{{
            qa.question
          }}</span>
        </div>
        <div class="bbox">
          <img src="../../assets/qaanswer.png" alt="" />
          <div v-html="qa.answer" class="word"></div>
        </div>
        <div class="from">--暖暖小课堂</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      qa: {},
    };
  },
  methods: {
    back() {
      this.$router.go(-1);
    },
  },
  created() {
    this.qa = this.$route.query.qa;
  },
};
</script>

<style lang="less" scoped>
.all {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.tipwords {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  padding: 80px 0 40px;
  text-align: center;
  background-color: #283484;
}
.content {
  flex: 1;
  padding: 20px 15px;
  background-color: #e3e3e3;
  z-index: 900;
  flex: 1;
  .imgpart {
    position: relative;
    > img {
      width: 100%;
    }
    .centerimg {
      position: absolute;
      z-index: 10000;
      width: 50px;
      left: 50%;
      top: -10px;
      margin-left: -25px;
    }
  }
  .wordpart {
    position: relative;
    z-index: 1000;
    margin: -70px 10px 0;
    background-color: #fff;
    padding: 60px 20px 30px 15px;
    border-radius: 10px;
    .tbox {
      display: flex;
      align-items: center;
      img {
        width: 20px;
        margin-bottom: 10px;
      }
      span {
        font-size: 16px;
        color: #333;
        font-weight: bold;
        margin-left: 10px;
        margin-bottom: 10px;
        display: inline-block;
      }
    }
    .bbox {
      display: flex;
      margin-top: 5px;
      > img {
        width: 20px;
        height: 20px;
      }
      /deep/.word {
        margin-left: 10px;
        font-size: 13px;
        color: #333;
        word-wrap: break-word;
        word-break: break-all;
        overflow: hidden;
        > div {
          margin-bottom: 5px;
          line-height: 20px;
        }
        > p {
          margin: 0;
          margin-bottom: 5px;
          line-height: 20px;
        }
      }
    }
    .from {
      margin-top: 10px;
      text-align: right;
      font-weight: bold;
      font-size: 13px;
      color: #333;
    }
  }
}
</style>